package com.fxwater.biz.service.impl;

import com.fxwater.biz.domain.ItemInfo;
import com.fxwater.biz.mapper.ItemInfoMapper;
import com.fxwater.biz.service.ItemService;
import com.fxwater.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ItemServiceImpl implements ItemService {
    @Autowired
    private ItemInfoMapper itemInfoMapper;


    @Override
    public List<ItemInfo> selectItemInfoList(ItemInfo itemInfo) {
        return itemInfoMapper.selectItemInfoList(itemInfo);
    }

    @Override
    public int editSaveItemInfo(ItemInfo itemInfo) {
        return itemInfoMapper.editSaveItemInfo(itemInfo);
    }

    @Override
    public int addItem(ItemInfo itemInfo) {
        return itemInfoMapper.addItem(itemInfo);
    }

    @Override
    public int removeItem(String ids) {
        return itemInfoMapper.removeItem(Convert.toStrArray(ids));
    }

    @Override
    public List<ItemInfo> selectItemInfoByPumpCode(ItemInfo itemInfo){
        return itemInfoMapper.selectItemInfoByPumpCode(itemInfo);
    }
}
